package com.zmn.oms.business.interfaces.masterphoto;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.order.photo.OrderPhotoDetectionDTO;
import com.zmn.oms.model.dto.order.photo.OrderPhotoDetectionResultDTO;
import com.zmn.oms.model.dto.work.modify.OrderPhotoDTO;
import com.zmn.oms.model.entity.orderattachment.OrderAttachment;
import com.zmn.oms.model.entity.work.OrderWork;

/**
 * @author: SongWeidong
 * @description: 工程师拍照
 * @create: 2019-07-12 13:02
 **/
public interface OrderPhotoBService {


    void updateOrderPhoto (OrderPhotoDTO orderPhotoDTO);

    /**
     * 将某类型图片发送图片检测请求
     *
     * @param dto
     */
    void  sendImageDetectionRequest(OrderPhotoDetectionDTO dto) throws OmsBaseException;

    /**
     * 发送自动审核工单照片
     *
     * @param orderId 订单ID
     * @param workId 工单ID
     * @param attachmentId 附件ID
     * @param pictureType 照片类型
     */
    void sendImageDetectionMessage(Long orderId, Long workId, Long attachmentId, Integer pictureType);

    /**
     * 自动审核工单照片
     *
     * @param dto
     */
    void autoAuditOrderPhoto(OrderPhotoDetectionResultDTO dto) throws OmsBaseException;


    /**
     * 自动审核工单照片 并 更新审核结果
     *
     * @param dto
     */
    void autoAuditOrderPhoto(OrderPhotoDetectionDTO dto) throws OmsBaseException;


    /**
     * 根据审核结果 对工单照片进行审核
     *
     * @param orderWork
     * @param incompleteAttachment
     * @param detectionDTO
     */
    void auditPhotoResult(OrderWork orderWork, OrderAttachment incompleteAttachment, OrderPhotoDetectionDTO detectionDTO) throws OmsBaseException;
}
